//
//  HomeTableViewCell.m
//  Fragrance
//
//  Created by yinzhongyuan on 15/5/22.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "HomeTableViewCell.h"

@implementation HomeTableViewCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createMyView];
    }
    return self;
    
}

- (void)createMyView
{
    self.icon = [[[UIImageView alloc] init] autorelease];
    [self.contentView addSubview:self.icon];
    
    self.caiName = [[[UILabel alloc] init] autorelease];
    [self.contentView addSubview:self.caiName];

    self.details = [[[UILabel alloc] init] autorelease];
    [self.contentView addSubview:self.details];
    
}


- (void)layoutSubviews
{
    
    [super layoutSubviews];
    
    self.icon.frame = CGRectMake(0, 0, 100, 100);
    
    
    self.caiName.frame = CGRectMake(110, 0, self.contentView.frame.size.width - 110, 30);
    self.caiName.backgroundColor = [UIColor whiteColor];
    
    self.details.frame = CGRectMake(110, 30, self.contentView.frame.size.width - 110, 70);
    self.details.backgroundColor = [UIColor whiteColor];
    self.details.font = [UIFont systemFontOfSize:13.0];
    self.details.numberOfLines = 4;
}



































- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
